Page({
  data:{
    list:[{
      id: 0,
      title: "day1",
      detail: "基础数据绑定学习",
      url: "day1/day1",
      createtime: "2022-2-7",
    },{
      id: 1,
      title: "day2",
      detail: "cell实现",
      url: "day2/day2",
      createtime: "2022-2-9"
    },{
      id: 2,
      title: "day3",
      detail: "BLE实现",
      url: "day3/day3",
      createtime: "2022-2-10"
    },{
      id: 3,
      title: "day4",
      detail: "使用全局的蓝牙来实现蓝牙指令",
      url: "day4/day4",
      createtime: "2022-2-15"
    }]
  },
  click_cell(e){
    const id = e.currentTarget.id;
    const list = this.data.list;
    for (let i = 0, len = list.length; i < len; ++i) {
      if (list[i].id == id) {
        wx.navigateTo({
          url: '../study/' + list[i].url
        })
      }
    }
  }
})